//
//  GestureViewController.m
//  Monosaccharides
//
//  Created by iSolar on 2017/11/15.
//  Copyright © 2017年 nothing. All rights reserved.
//

#import "GestureViewController.h"
#import "LockPassView.h"

@interface GestureViewController ()<LockPassViewDelegate, UIAlertViewDelegate>

@property (weak, nonatomic) IBOutlet UIImageView *iconView;

@property (weak, nonatomic) IBOutlet LockPassView *lockView;


@end

@implementation GestureViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    self.title = @"手势解锁";
    
    self.lockView.delegate = self;
    
}


#pragma mark -- 手势解锁代理
- (void)lockPassViewOnValue:(NSString *)buttonValue andPrintScreenImage:(UIImage *)printScreenImage {
    
    NSLog(@"代理获取的密码是%@", buttonValue);
    self.iconView.image = printScreenImage;
    
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"获取的密码: %@", buttonValue] message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
    [alert show];
}


@end
